<template>
    <div>
        <el-button type="primary" @click="add">修改</el-button>
    </div>
</template>

<script setup lang='ts'>
import { ref, reactive, getCurrentInstance } from 'vue'

const instance = getCurrentInstance()

let num = 0
const add = () => {
    num++
    // console.log();
    instance?.proxy?.$Bus.emit('changeNum', num)

}
</script>

<style scoped></style>